#pragma once

#include "BitmapEx.h"

class CSnapshot
{
private:
	unsigned char* m_pBuffer;
	unsigned int m_nBufferSize;

	LPBITMAPFILEHEADER m_pBitmapFileHeader;
	LPBITMAPINFO m_pBitmapInfo;
	void* m_pBitmapBits;

	CBitmapEx m_Bitmap;
public:
	CSnapshot();
	~CSnapshot(void);

	BOOL InitBuffer(CSize sizeImage, UINT nBitsPerPiexel = 32);
	void* GetBitmapDataBuffer();
	unsigned int GetBitmapDataBufferSize();
	void Complete();

	BOOL Save(LPCTSTR lpszFileName);
	CBitmapEx* GetBitmap(){
		return &m_Bitmap;
	}
};
